<template>

  <el-container>
    <el-header>
      <topNavbar :path="path" :title="title" :content="content"></topNavbar>
    </el-header>
    <el-main>
      <el-tabs type="border-card" v-model="tabindex" @tab-click="handleClick">
        <el-tab-pane label="系统信息" name="0">

          <el-table
            :data="projectList"
            @row-click="getDetail"
          >
            <el-table-column prop="batch_id" label="项目编号"></el-table-column>
            <el-table-column prop="company" label="招标公司"></el-table-column>
            <el-table-column prop="name" label="项目名称"></el-table-column>
          </el-table>

        </el-tab-pane>

        <el-tab-pane label="常用功能" name="1">
          <el-empty description="开发中"></el-empty>
        </el-tab-pane>

      </el-tabs>
    </el-main>
  </el-container>

</template>

<script>
    import topNavbar from '@/components/common/topNavbar'
    import {getOrderList} from '@/apilist/Supplier'
    export default {
        name: "projectRequest",
        data(){
            return {
                title: '采购',
                content: '项目需要',
                path: '/supplier',
                tabindex: 0,
                projectList : [],
            }
        },
        components: {topNavbar,},
        methods: {
            handleClick(tab,event){
            },
            getDetail(row,col,event){
                const {id,name} = row
                this.$router.push(
                    {
                        path: '/supplier/detail',
                        query: {
                            id: id,
                            name: name,
                        }
                    }
                )
            }
        },

        mounted() {
            //this.content = this.$route.query.title
            getOrderList({status: 0}).then(res => {
               this.projectList = res.data.waiting
            });
        }
    }
</script>

<style scoped>

</style>
